﻿#include "CmdPolarCoordinateGraphAddTracer.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdPolarCoordinateGraphAddTracer::CmdPolarCoordinateGraphAddTracer()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdPolarCoordinateGraphAddTracer::~CmdPolarCoordinateGraphAddTracer()
    {
    }

    bool CmdPolarCoordinateGraphAddTracer::execute()
    {
        // bool _success = false;
        emit IBaseSignalInstance->signal_polarCoordinateGraphAddTracer(m_mainWindowId, m_name, m_angle, m_tracerStyle, m_size, m_penR, m_penG, m_penB, m_penA, m_brushR, m_brushG, m_brushB, m_brushA, m_interpolating, m_curveInfoID, m_tracerIndex);
        return true;
    }

    void CmdPolarCoordinateGraphAddTracer::undo()
    {
    }

    void CmdPolarCoordinateGraphAddTracer::redo()
    {
        // execute();
    }

    void CmdPolarCoordinateGraphAddTracer::setPolarCoordinateGraphAddTracer(int mainWindowId, QString name, double angle, int tracerStyle, int size, int penR, int penG, int penB, int penA,
                            int brushR, int brushG, int brushB, int brushA, int interpolating, int curveInfoID, int tracerIndex)
    {
        m_mainWindowId = mainWindowId;
        m_name = name;
        m_angle = angle;
        m_tracerStyle = tracerStyle;
        m_size = size;
        m_penR = penR;
        m_penG = penG;
        m_penB = penB;
        m_penA = penA;
        m_brushR = brushR;
        m_brushG = brushG;
        m_brushB = brushB;
        m_brushA = brushA;
        m_interpolating = interpolating;
        m_curveInfoID = curveInfoID;
        m_tracerIndex = tracerIndex;
    }

} // namespace PostCommand
